package com.ilearn.iodata.iolingo.service.metadata.core.edm.mapper.api;

import java.util.List;
import java.util.Set;

/**
 * Created by lyndon on 2018/5/29.
 */
public interface Subquery<T> extends AbstractQuery<T>, Expression<T> {
    Subquery<T> select(Expression<T> var1);

    Subquery<T> where(Expression<Boolean> var1);

    Subquery<T> where(Predicate... var1);

    Subquery<T> groupBy(Expression... var1);

    Subquery<T> groupBy(List<Expression<?>> var1);

    Subquery<T> having(Expression<Boolean> var1);

    Subquery<T> having(Predicate... var1);

    Subquery<T> distinct(boolean var1);

    <Y> Root<Y> correlate(Root<Y> var1);

    <X, Y> Join<X, Y> correlate(Join<X, Y> var1);

    <X, Y> CollectionJoin<X, Y> correlate(CollectionJoin<X, Y> var1);

    <X, Y> SetJoin<X, Y> correlate(SetJoin<X, Y> var1);

    <X, Y> ListJoin<X, Y> correlate(ListJoin<X, Y> var1);

    <X, K, V> MapJoin<X, K, V> correlate(MapJoin<X, K, V> var1);

    AbstractQuery<?> getParent();

    CommonAbstractCriteria getContainingQuery();

    Expression<T> getSelection();

    Set<Join<?, ?>> getCorrelatedJoins();
}
